package io.gitee.baicaixiaozhan.httpmessageconverter.jackson;

import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector;
import io.gitee.baicaixiaozhan.httpmessageconverter.annotation.Desensitize;

/**
 * DESC:
 *
 * @author baicaixiaozhan
 * @since v1.0.0
 */
public class DesensitizeNopAnnotationIntrospector extends NopAnnotationIntrospector {

    @Override
    public Object findSerializer(Annotated am) {
        if (null != am && am.hasAnnotation(Desensitize.class)) {
            return new DesensitizeSerializer(am.getAnnotation(Desensitize.class));
        }
        return null;
    }
}